<template>
    <div id="app">
        <h2>App组件</h2>
        <button v-on:click="decrement">-</button>
        {{ count }}
        <button v-on:click="increment">+</button>
        <hr>
        <HelloWorld fengliulin="手机号码"></HelloWorld>
    </div>
</template>

<script lang="ts">
import {Component, Vue} from 'vue-property-decorator'

import HelloWorld from "./components/HelloWorld.vue";

// 以类样式定义组件
@Component({
    components: {
        HelloWorld
    }
})
export default class App extends Vue {
    // 属性就是 相当于 data(){return {name:"fengliulin"}}
    count = 0

    // 组件的方法, 相当 method:{方法(){}}
    increment() {
        this.count++
    }


    decrement() {
        this.count--
    }
}
</script>

<style>
#app {
    font-family: Avenir, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #2c3e50;
    margin-top: 60px;
}
</style>
